﻿@page
@model DotNetStar.TheKing.Web.Pages.MySignInModel
@{
    int index = 1;
    Layout = "_Layout";

    ViewBag.Title = $"{Model.Year}年{Model.Month}月的签到记录";
}

@section styles{ 
<style type="text/css">
        .calendar td { height:100px; width:@(100/7)%;vertical-align:top}

        .check{opacity:0.5;}
</style>
}

<table class="table border calendar">
    <tr>
        @foreach (var item in Model.Calendar)
        {
        <td class="border text-center">
            <h4> @item.Item1.Day</h4>

            @if (item.Item2)
    {
        <sub class="check">
            <i class="fa fa-check-circle fa-4x text-success"></i>
        </sub>
}
        </td>
            bool isOdd = index % 7 == 0;
            @if (isOdd)
            {
                @Html.Raw("</tr><tr>");
            }
            index++;
        }
    </tr>
</table>
